{extend name="Public/layout2.html"}
{block name="body"}


<table class="layui-table">
    <thead>
    <tr>
        <th>id</th>
        <th>名称</th>
        <th>规则</th>
        <th>条件</th>
        <th>状态</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    {volist name="rule" id="rule"}

    <tr>
        <th>{$rule.id}</th>
        <th>{$rule.title}</th>
        <th>{$rule.name}</th>
        <th>{$rule.condition}</th>
        <th>{$rule.status}</th>
        <th>
            <div class="layui-btn-group">
                <button onclick="" class="layui-btn layui-btn-small">察看详情并编辑</button>

                <button onclick="del({$rule.id})" class="layui-btn layui-btn-small">删除</button>
            </div>
        </th>
    </tr>

    {/volist}
    </tbody>
</table>



{/block}
{block name="jslink"}
{__BLOCK__}
<script type="text/javascript">
    function del(id) {
        layer.confirm('确认删除?', {icon: 3, title:'删除'}, function(index){
        $.post("{:url('index/auth/deleterule')}",{id:id},function (result) {
            layer.msg(result.msg);
            window.location.reload();
        })

        })
    }



</script>
{/block}